home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
communic
/
autod3.zip
/
AUTODIAL.XWS
next >
Wrap
Text File
|
1991-01-12
|
4KB
|
139 lines
/*
Autodialer III Script
by Steven Kieffer [72027,2532]
1/09/1991
*/
integer phone1, phone2, phone3, phone4, phone5, counter, repeat_inf
integer repeat_five
string ph1, ph2, ph3, ph4, ph5, phone_dir, phone_number, new_phone
if online then Alarm : alert "You are still online !!!",ok : end
phone_dir = dirxws + "\autodial.dat"
trap on
display off
repeat_five is true
gosub get_choices
label prog_start
dialogbox 34,23,130,125
ctext 4,4,120,10,"AUTODIALER III by Steven Kieffer"
groupbox 8,20,70,75,"Phone choices:"
checkbox 12,32,50,12,ph1,phone1,tabstop focus
checkbox 12,44,50,12,ph2,phone2,tabstop
checkbox 12,56,50,12,ph3,phone3,tabstop
checkbox 12,68,50,12,ph4,phone4,tabstop
checkbox 12,80,50,12,ph5,phone5,tabstop
radiobutton 12,100,90,10,"&Repeat infinitely",repeat_inf,tabstop group
radiobutton 12,110,90,10,"Repeat 5 times",repeat_five
defpushbutton 85,32,36,14,"OK",ok,tabstop group
pushbutton 85,52,36,14,"CANCEL",cancel,tabstop
pushbutton 85,72,36,14,"&CONFIG",tabstop
enddialog
if choice is 2 then end
if choice is 3 then goto config
message "Initializing modem..."
go : wait 1 second
reply modeminit
wait 1 second
repeat
if repeat_five is true then counter=counter+1
if phone1 then load ph1 : gosub service
if phone2 then load ph2 : gosub service
if phone3 then load ph3 : gosub service
if phone4 then load ph4 : gosub service
if phone5 then load ph5 : gosub service
until counter is 5
alarm : alarm : alarm
alert "Autodial completed. No connections made.",ok : END
--- START CALLING PROCEDURE TO MODEM
label SERVICE
if upcase(left(number)) is "X" then phone_number = dialprefix + number
else phone_number = dialprefix + outnumber + number
if upcase(left(number)) is "L" then phone_number = dialprefix + ldnumber + number
message "Dialing -- " + description + "." + " Press ESC to halt. (" + str(counter) + ")"
go : wait 1 second
reply phone_number
watch 30 seconds for
"BUSY" : --- recycle dial
"CONNECT" : alarm : if null(script) then end else chain script
"ERROR" : alert "Modem error !!! Check your modem settings.", ok
"NO DIAL" : alert "No dial Tone !!! Check your phone line.", ok
"NO CARRIER" : --- recycle dial
count 15 : alarm : if null(script) then end else chain script
key 27 : bye : end
endwatch
off
return
--- LOAD SELECTION OF BBS'S TO CHOOSE FROM.
label get_choices
if not exists(phone_dir) then
{
alarm : alarm
alert "No autodial file! Please run CONFIG.", ok
return
}
open input phone_dir as #1
read #1, ph1, ph2, ph3, ph4, ph5
close
return
--- CONFIGURATION MENU TO ADD OR DELETE CHOICES
label config
dialogbox 34,23,130,125
ctext 4,4,120,10,"== Configuration Menu =="
groupbox 8,20,70,75,"Phone delete/add:"
checkbox 12,32,50,12,ph1,phone1,tabstop
checkbox 12,44,50,12,ph2,phone2,tabstop
checkbox 12,56,50,12,ph3,phone3,tabstop
checkbox 12,68,50,12,ph4,phone4,tabstop
checkbox 12,80,50,12,ph5,phone5,tabstop
ltext 12,107,65,8,"&New phone entry:"
edittext 75,105,45,12,"",new_phone,tabstop
defpushbutton 85,32,36,14,"OK",ok,tabstop group
pushbutton 85,52,36,14,"EXIT",cancel,tabstop
enddialog
if choice is 2 then goto prog_start
if not exists(dirxwp + "\" + new_phone + ".xwp") and not null(new_phone) then
{
alarm
alert new_phone + " does not exist !",ok
goto config
}
if phone1 then ph1 = new_phone : phone1 is false
if phone2 then ph2 = new_phone : phone2 is false
if phone3 then ph3 = new_phone : phone3 is false
if phone4 then ph4 = new_phone : phone4 is false
if phone5 then ph5 = new_phone : phone5 is false
open output phone_dir as #1
write #1, ph1, ph2, ph3, ph4, ph5
close
goto config